<!DOCTYPE html>
<html>
<head>
    {include file="public/header" /}
</head>
<body>
<div style="padding-bottom:200px" class="layui-form layuimini-form">

    <input type="hidden" name="id" value="{$res.id}" />
    <input type="hidden" name="bizpro_id" value="{$res.bizpro_id}" />
    <input type="hidden" name="advert_type" value="{$cate}" />
    <div class="layui-form-item">
        <label class="layui-form-label required">名称</label>
        <div class="layui-input-block">
            <input type="text"  value="{$res.title}" name="title" lay-verify="required" lay-reqtext="名称不能为空" placeholder="请输入名称"  class="layui-input">
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label required">类型</label>
        <div class="layui-input-block">
            <select name="show_type" lay-filter="show_type">
                <option {if condition="$res.show_type==1"} selected {/if} value="1">弹窗</option>
                <option {if condition="$res.show_type==2"} selected {/if} value="2">跳转</option>
                <option {if condition="$res.show_type==3"} selected {/if} value="3">详情</option>
                <option {if condition="$res.show_type==4"} selected {/if} value="4">无操作</option>
            </select>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label required">位置</label>
        <div class="layui-input-block">
            <select name="advert_type" lay-filter="show_type">

                <option {if condition="$res.advert_type==2"} selected {/if} value="2">我的页广告1</option>
                <option {if condition="$res.advert_type==3"} selected {/if} value="3">我的页广告2</option>
            </select>
        </div>
    </div>

    <!--展示详情-->
    <div class="layui-form-item layui-form-text"  {if condition="$res.show_type !=3"}  style="display: none"  {/if}>
    <label class="layui-form-label">展示详情</label>
    <div class="layui-input-block">


        <div class="layui-textarea" id='LAY_demo_editor' ></div>

        <input type="hidden" id="editorimgurlHidden"  name="editor_imgs" value="{$res.editor_imgs}" >
        <!--<input    type="hidden" id="content1" value="{$res.detail}" >-->
    </div>
    </div>
    <div id="hideDetail" style="display: none">
        {$res.content}
    </div>
    <!--跳转地址-->
    <div class="layui-form-item" {if condition="$res.show_type !=2"}  style="display: none"  {/if}>
    <label class="layui-form-label required">跳转地址</label>
    <div class="layui-input-block">
        <input type="text" id="jump_address"   value="{$res.jump_address}"   name="jump_address"       class="layui-input">
    </div>
    </div>



{if condition="!$res.id"}
<div class="layui-form-item" >
    <label class="layui-form-label">弹窗图片</label>
    <input type="hidden" id="imgurlHidden1" name="pop_imgurl">
    <div class="layui-input-inline uploadHeadImage">
        <div class="layui-upload-drag" id="headImg1">
            <i class="layui-icon"></i>
            <p>点击上传图片，或将图片拖拽到此处</p>
        </div>
    </div>
    <div class="" style="display: flex">
        <div class="layui-upload-list" style="margin-top: 5px;">
            <img class="layui-upload-img headImage" style="height: 100px;" src="" id="imgurl1">
            <p id="demoText1"></p>
        </div>
        <div class="layui-form-mid layui-word-aux">
            <span class="x-red">*</span>为保证图片质量，缩略图请尽量选择200*200的方形图片,图片大小不要超过500KB,一般在30KB-100KB之间
        </div>
    </div>
</div>
{/if}

{if condition="$res.show_type ==1"}
{if condition="$res.pop_imgurl"}
<div class="layui-form-item" {if condition="$res.show_type !=1"}  style="display: none"  {/if}>
<label class="layui-form-label">弹窗图片</label>
<input type="hidden" id="imgurlHidden1" name="pop_imgurl" value="{$res.pop_imgurl}">
<div class="layui-input-inline uploadHeadImage">
    <div class="layui-upload-drag" id="headImg1">
        <i class="layui-icon"></i>
        <p>点击上传图片，或将图片拖拽到此处</p>
    </div>
</div>
<div class="layui-input-inline">
    <div class="layui-upload-list" style="margin-top: 5px;">
        <img class="layui-upload-img headImage" style="height: 100px;" src="{$res.pop_imgsrc}" id="imgurl1">
        <p id="demoText1"></p>
    </div>
</div>
</div>
{else}
<div class="layui-form-item" {if condition="$res.show_type !=1"}  style="display: none"  {/if}>
<label class="layui-form-label">弹窗图片</label>
<input type="hidden" id="imgurlHidden1" name="pop_imgurl">
<div class="layui-input-inline uploadHeadImage">
    <div class="layui-upload-drag" id="headImg1">
        <i class="layui-icon"></i>
        <p>点击上传图片，或将图片拖拽到此处</p>
    </div>
</div>
<div class="" style="display: flex">
    <div class="layui-upload-list" style="margin-top: 5px;">
        <img class="layui-upload-img headImage" style="height: 100px;" src="" id="imgurl1">
        <p id="demoText1"></p>
    </div>
    <div class="layui-form-mid layui-word-aux">
        <span class="x-red">*</span>为保证图片质量，缩略图请尽量选择200*200的方形图片,图片大小不要超过500KB,一般在30KB-100KB之间
    </div>
</div>
</div>
{/if}
{/if}

{if condition="$res.id"}
<div class="layui-form-item">
    <label class="layui-form-label">缩略图</label>
    <input type="hidden" id="imgurlHidden" name="imgurl" value="{$res.imgurl}">
    <div class="layui-input-inline uploadHeadImage">
        <div class="layui-upload-drag" id="headImg">
            <i class="layui-icon"></i>
            <p>点击上传图片，或将图片拖拽到此处</p>
        </div>
    </div>
    <div class="layui-input-inline">
        <div class="layui-upload-list" style="margin-top: 5px;">
            <img class="layui-upload-img headImage" style="height: 100px;" src="{$res.imgsrc}" id="imgurl">
            <p id="demoText"></p>
        </div>
    </div>
</div>
{else}
<div class="layui-form-item">
    <label class="layui-form-label">缩略图</label>
    <input type="hidden" id="imgurlHidden" name="imgurl">
    <div class="layui-input-inline uploadHeadImage">
        <div class="layui-upload-drag" id="headImg">
            <i class="layui-icon"></i>
            <p>点击上传图片，或将图片拖拽到此处</p>
        </div>
    </div>
    <div class="" style="display: flex">
        <div class="layui-upload-list" style="margin-top: 5px;">
            <img class="layui-upload-img headImage" style="height: 100px;" src="" id="imgurl">
            <p id="demoText"></p>
        </div>
        <div class="layui-form-mid layui-word-aux">
            <span class="x-red">*</span>为保证图片质量，缩略图请尽量选择200*200的方形图片,图片大小不要超过500KB,一般在30KB-100KB之间
        </div>
    </div>
</div>
{/if}


<div class="layui-form-item">
    <label class="layui-form-label required">上下架时间</label>
    <div class="layui-input-block">
        <input type="text" id="start_time" {if condition="$res.start_time"}  value="{$res.start_time} - {$res.end_time}" {else} value="" {/if}  name="start_time" lay-verify="required" lay-reqtext="上架时间不能为空"    class="layui-input">
    </div>
</div>



<div class="layui-form-item">
    <div class="layui-input-block">
        <button class="layui-btn layui-btn-normal" lay-submit lay-filter="saveBtn">确认保存</button>
    </div>
</div>
<!--</form>-->
</div>
{include file="public/footer" /}
<script src="/static/admin/adverbanner/saveinfo_usercenter.js?v={$Think.const.TIMESTAMP}" charset="utf-8"></script>

</body>
</html>